import Vue from 'vue'
import Router from 'vue-router'
import Hello from '@/components/Hello'
import UserTable from "../components/UserTable";
import AddUser from "../components/AddUser";
import UpdateUser from "../components/UpdateUser";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: Hello,
      children:[
        {
          path: '/user/add',
          name: 'addUser',
          component: AddUser
        },
        {
          path: '/user/show',
          name: 'showUsers',
          component: UserTable
        }
      ]
    },
    {
      path: '/user/update',
      name: 'updateUser',
      component: UpdateUser
    }
  ]
})
